//
//  WTPlayAccountView.m
//  WTPlayDemo
//
//  Created by ben on 16/7/15.
//  Copyright © 2016年 ben. All rights reserved.
//

#import "WTPlayAccountView.h"
#import "Masonry.h"

@interface WTPlayAccountView ()
@property (nonatomic, strong) UILabel*  valueLabel;
@end


@implementation WTPlayAccountView
- (instancetype)initWithFrame:(CGRect)frame{
    if(self = [super initWithFrame:frame]){
        
        self.backgroundColor = [UIColor colorWithWhite:0 alpha:0.2];
        self.layer.cornerRadius = 12;
        self.layer.masksToBounds = YES;
        [self setup];
    }
    return self;
}


#pragma mark - 
- (void)setup{
    
    self.valueLabel = ({
        UILabel* label = [[UILabel alloc] init];
        label.textColor = [UIColor whiteColor];
        label.font = [UIFont systemFontOfSize:12];
        label.text = @"账号:189568568";
        label.textAlignment = NSTextAlignmentCenter;
        [self addSubview:label];
        label;
    });
    
    [self layout];
}


#pragma mark - 
- (void)layout{
    
    [self.valueLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerY.mas_equalTo(self.mas_centerY);
        make.centerX.mas_equalTo(self.mas_centerX).offset(2);
    }];
}

#pragma mark setter
- (void)setCuteCode:(NSString *)cuteCode{
    self.valueLabel.text = [NSString stringWithFormat:@"%@%@",@"账号:",cuteCode];
}
@end
